The present invention relates to a method of constructing a network topology, and, more particularly, to a network topology constructing method and interface circuit which are suitable for the standards of IEEE 1394.
According to IEEE 1394, packet transfer is controlled by an interface circuit and a state machine of each node. The individual nodes are connected to one another via ports and buses to form a network topology. When bus resetting occurs at one node, each node executes a bus initialization step. In a bus reset state (bus reset start to bus reset wait) of each state machine, topology information registered in each node is erased by the bus initialization step.
When the bus initialization step ends, the state machine of each node goes into a tree ID state. In the tree ID state, the state machine of each node sees the topology as a tree and identifies the topology or the connection state of each node. That is, first an adequate node is selected as a root node and the other nodes are regarded as branches or leaves.
Specifically, the tree ID state that conforms to the draft of IEEE 1394 includes a T0 state (tree ID state) 50, a T1 state (child handshake) 51, a T2 state (parent handshake) 52 and a T3 state 53, as shown in FIG. 1.
When the process of a bus reset wait R1 is finished, each state machine goes to the T0 state 50. In the T0 state 50, a parent notify signal requesting a parent node is supplied to ports of the node. The T0 state 50 continues until there remains one port that has not received the parent notify signal. Then, each state machine moves to the T1 state 51. Note that because a leaf node (end node) has only one port to be connected to another node, the state machine of the leaf node immediately moves to the T1 state 51 from the T0 state 50.
In the T1 state 51, the state machine of the first node that has received the parent notify signal sends the state machine of the second node, or the sender, a child notify signal indicating that the node is acknowledged as its own child.
In the next T2 state 52, the state machine of the second node sends the parent notify signal to the ports of the third node that have not received the parent notify signal and waits for the child notify signal to be supplied to its port from the third node. When the child notify signal is input to that port, the tree identification step ends. In the T3 state 53, arbitration at the time of tree identification is performed.
The parent notify signal is supplied from a leaf node to a branch node (a node along the way). When there remains one port of a branch node that has not received the parent notify signal, the state machine of the branch node sends the child notify signal to the leaf node and sends the parent notify signal to another node from the remaining one port. As this work is repeated and the last node that has received the parent notify signal and returned the child notify signal is set as the root node, each node identifies the parent-children relationship.
When the tree identification step ends, the state machine of each node goes to a self ID state 50 and performs a self identification step. In the self identification step, a physical ID to be used as the address of each node is selected. Accordingly, management information about the bus connection is prepared. When the self identification step is completed, normal packet transfer becomes possible among the individual nodes.
The packet transfer system that is defined by the IEEE 1394 standards does not allow a loop-like topology. When a topology is like a loop, for example, there exists no root node having a single port that has not received the parent notify signal at the time of identifying the topology, so that the identification process is stacked in the T0 state 50. Because an out-of-loop node that does not exist on the loop cannot receive the child notify signal from a node on the loop, the identification process at the out-of-loop node is stacked in the T2 state 52. When stacking occurs in the T2 state 52 for a predetermined time, the out-of-loop node retries the bus initialization, but the topology has not been changed so the stacking occurs again. Therefore, topology identification is not completed.
In this case, a user must reconnect the nodes to overcome the problem of the loop connection. When there are multiple nodes or when nodes are arranged over a plurality of rooms, however, the connection work takes much time and labor.